<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta name="viewport"
	content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>中奖页面</title>
<link rel="stylesheet" type="text/css" href="${ctx}/css/wx/style2.css">

<script type="text/javascript"
	src="${ctx}/js/wx/model/jquery-1.8.0.min.js"></script>
</head>
<body>
	<div class="main">
		<div class="content-box">

			<!--prize pop-up content start-->
			<div class="overlaye" id="overlay-prize" display="block">
				<div class="prize-box">
					<div class="content">
						<p>人品大爆发，获得</p>
						<p>${retult.jp} 一个，是不是好开</p>
						<p>心呀，怒赞一个！</p>
						<div class="intro clear">
							<img src=" ${retult.imgpath} " style="width:120px;">
							<div>
								<h3>&nbsp;${retult.jpjs}：${retult.jp}</h3>
								<span>&nbsp;领奖方式：在下方填写您的信</span><span>&nbsp;息，工作人员会尽快联系您的。</span>
							</div>
						</div>
						<div class="info">
						<h3>请输入个人联系方式:</h3>
						<input type="hidden" id="id" name="id" value="${retult.id}">
						<ul>
							<li><label>手机</label> <input type="text" id="mobile" name="mobile"></li>
						</ul>
						<div class="btn-box">
							<a href="#" class="btn" id="submit-btn">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;提交&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
						</div>
						</div>
					</div>
				</div>
			</div>

			<!--prize pop-up content end-->

			<!--succeed pop-up content start-->
			<div class="overlay" id="pop-succeed">
				<div class="pop-up rule-box">
					<h2>成功提交！</h2>
					<br /> <br /> <br /> <a href="http://hql.tunnel.phpor.me/api/wx/activity.shtml" class="btn again"
						style="margin-right: 20px;">再玩一次</a>
				</div>
			</div>
			
			<div class="overlay" id="pop-error">
				<div class="pop-up rule-box">
					<h2>请输入正确的手机号码！</h2>
					<br /> <br /> <br /> <a href="javascript:$('#pop-error').hide();" class="btn again"
						style="margin-right: 20px;">确定</a>
				</div>
			</div>
			<!--succeed pop-up content end-->

			<!--share pop-up content start-->
			<div class="overlay" id="pop-share">
				<img src="${ctx}/images/wx/430-290.png" class="share-pic">
			</div>
			<!--share pop-up content end-->
		</div>
	</div>

	<script type="text/javascript">
		$(function() {
			$("#submit-btn").on("click", function() {
				var reg = /^\d{11}$/;
				var mobile = $("#mobile").val();
				if(!reg.test(mobile)) {
					$("#pop-error").show();
					return;
				}
			
				$.post("${ctx}/api/wxfrom/editwinuser.shtml",{
					id:$("#id").val(),
					mobile:$("#mobile").val()
				},function(resp){
					if(resp) {
						$("#pop-succeed").show();
					}
				},"json");
			});
		});
	</script>
</body>
</html>